<!doctype html>
<html class="no-js" lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<title>oauth认证中心</title>
	<meta content="" name="description">
	<meta content="width=device-width, initial-scale=1" name="viewport">
	<meta content="#fafafa" name="theme-color">
	<link href="./css/style.css" rel="stylesheet"/>
	<script src="./js/jquery-3.2.1.min.js"></script>
	<script type="text/javascript">
		/*<![CDATA[*/
		$(document).ready(function () {
			$("#validate-code-img").attr("src","./kaptcha?" + Math.random());

			/*$(document).on("click","#validate-code-refresh",function () {
				$("#validate-code-img").attr("src","./kaptcha?" + Math.random());
			});*/

			$(document).on("click","#login-btn",function () {
				if (checkForm()){
					$("#login-form").submit();
				}

			});

			$(document).on("keypress","body",function (e) {
				if (e.which === 13) {
					if (checkForm()){
						$("#login-form").submit();
					}
				}
			});

		})
		
		
		function checkForm() {
			let username = $("#username").val();
			if (!username){
				$("#username").focus();
				return false;
			}
			let password = $("#password").val();
			if (!password){
				$("#password").focus();
				return false;
			}
			/*let code = $("#validate-code-input").val();
			if (!code){
				$("#validate-code-input").focus();
				return false;
			}*/
			return true;
		}
		/*]]>*/
	</script>

</head>

<body>
<div id="app">
	<div class="login-wrap" data-v-2529d779="">
		<div class="loginbox" data-v-2529d779="">
			<img src="./img/user.png" class="icon-user" alt="user"/>
			<form autocomplete="off" class="form ivu-form ivu-form-label-right" action="login" method="post" data-v-2529d779="" id="login-form">
				<input type="hidden" id="csrf_token" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
				<div class="ivu-form-item ivu-form-item-required" data-v-2529d779="">
					<div class="ivu-form-item-content">
						<div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type" data-v-2529d779="">
							<i class="ivu-icon ivu-icon-ios-loading ivu-load-loop ivu-input-icon ivu-input-icon-validate"></i>
							<input id="username" autocomplete="off" name="username" class="ivu-input ivu-input-default" placeholder="username" spellcheck="false" type="text">
						</div>
					</div>
				</div>
				<div class="ivu-form-item ivu-form-item-required" data-v-2529d779="">
					<div class="ivu-form-item-content">
						<div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type" data-v-2529d779="">
							<i class="ivu-icon ivu-icon-ios-loading ivu-load-loop ivu-input-icon ivu-input-icon-validate"></i>
							<input id="password" autocomplete="off" name="password" class="ivu-input ivu-input-default" placeholder="password" spellcheck="false" type="password">
						</div>
					</div>
				</div>
				<!--<div class="ivu-form-item ivu-form-item-required" id="validate-code-group" data-v-2529d779="">
					<div class="ivu-form-item-content">
						<div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type" data-v-2529d779="">
							<i class="ivu-icon ivu-icon-ios-loading ivu-load-loop ivu-input-icon ivu-input-icon-validate"></i>
							<input autocomplete="off" id="validate-code-input" name="ImageCode" class="ivu-input ivu-input-default" style="width: 30%" placeholder="验证码" spellcheck="false" type="text">
							<img style="" src="" id="validate-code-img">
							<button class="ivu-btn ivu-btn-primary" id="validate-code-refresh" data-v-2529d779="" type="button" style="width: 30%">
								<span>刷新</span>
							</button>
						</div>
					</div>
				</div>-->
				<div class="ivu-form-item" data-v-2529d779="">
					<div class="ivu-form-item-content">
						<button class="ivu-btn ivu-btn-primary" id="login-btn" data-v-2529d779="" type="button">
							<span>Login</span>
						</button>
					</div>
				</div>
			</form>
		</div>
		<div class="footer" data-v-2529d779="">Technology Limited</div>
	</div>
</div>

</body>

</html>
